package com.itheima.student.service;

import com.itheima.domain.Student;

import java.io.IOException;
import java.util.ArrayList;

public interface IStudentService {
    //增
    void addStudent(Student student);


    //删
    void deleteSidStudent(String sid);

    void deleteAllStudent();


    //改
    void updateStudent(String sid, Student student);

    //查
    ArrayList<Student> findAllStudent();

    Student findSidStudent(String sid);

    ArrayList<Student> findNameStudent(String name);

    ArrayList<Student> findAgeStudent(int age);

    ArrayList<Student> findPhoneStudent(String phone);

    ArrayList<Student> findGroupStudent(int group);


    //判断学号是否存在
    boolean isExists(String sid);

    boolean sexIsTrue(String sex);

    boolean phoneIsExists(String phone);

    boolean phoneIsTrue(String phone);


    //写入
    void writeStudent() throws IOException;

    //读取
    void readStudent() throws Exception;
}
